package com.sanqing.servlet;

import java.util.ArrayList;
import java.util.List;

import com.sanqing.bean.Message;
import com.sanqing.dao.MessageDAO;
import com.sanqing.factory.MessageDAOFactory;
import com.sanqing.util.Page;
import com.sanqing.util.PageUtil;

public class Text {
	
	public static void main(String[] args) {
		int currentPage=1;
		MessageDAO messageDAO=MessageDAOFactory.getMessageDAOInstance();
		
		Page page=PageUtil.createPage(5, messageDAO.findAllCount(), currentPage);
		System.out.println(messageDAO.findAllCount());
		System.out.println(page.getEveryPage());
		System.out.print(page.getBeginIndex());
				
		
		
		
	}
	

}
